package com.ruoyi.video.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.video.mapper.VideoDetailMapper;
import com.ruoyi.video.domain.VideoDetail;
import com.ruoyi.video.service.IVideoDetailService;
import com.ruoyi.common.core.text.Convert;

/**
 * 模板内容Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-07
 */
@Service
public class VideoDetailServiceImpl implements IVideoDetailService 
{
    @Autowired
    private VideoDetailMapper videoDetailMapper;

    /**
     * 查询模板内容
     * 
     * @param id 模板内容主键
     * @return 模板内容
     */
    @Override
    public VideoDetail selectVideoDetailById(Integer id)
    {
        return videoDetailMapper.selectVideoDetailById(id);
    }

    /**
     * 查询模板内容列表
     * 
     * @param videoDetail 模板内容
     * @return 模板内容
     */
    @Override
    public List<VideoDetail> selectVideoDetailList(VideoDetail videoDetail)
    {
        return videoDetailMapper.selectVideoDetailList(videoDetail);
    }

    /**
     * 新增模板内容
     * 
     * @param videoDetail 模板内容
     * @return 结果
     */
    @Override
    public int insertVideoDetail(VideoDetail videoDetail)
    {
        return videoDetailMapper.insertVideoDetail(videoDetail);
    }

    /**
     * 修改模板内容
     * 
     * @param videoDetail 模板内容
     * @return 结果
     */
    @Override
    public int updateVideoDetail(VideoDetail videoDetail)
    {
        return videoDetailMapper.updateVideoDetail(videoDetail);
    }

    /**
     * 批量删除模板内容
     * 
     * @param ids 需要删除的模板内容主键
     * @return 结果
     */
    @Override
    public int deleteVideoDetailByIds(String ids)
    {
        return videoDetailMapper.deleteVideoDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除模板内容信息
     * 
     * @param id 模板内容主键
     * @return 结果
     */
    @Override
    public int deleteVideoDetailById(Integer id)
    {
        return videoDetailMapper.deleteVideoDetailById(id);
    }
}
